<template>
  <div class="style-2">
    <el-button type="primary" @click="login">使用睿那账户登录</el-button>
  </div>

</template>

<script>
  import axios from 'axios'
  axios.defaults.withCredentials = true;
  // axios.defaults.baseURL = 'http://192.168.3.13:8080';
  // axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;

  export default {
    name: "element",
    beforeCreate() {
      alert(this.$cookie.get('rnty_access_token'))
    },
    methods: {
      login() {
        this.GLOBAL.tokenRequest({
          baseURL: this.GLOBAL.RNTY_AUTH_BASE_URL,
          method: 'get',
          url: 'users'
        }).then((res)=>{
          console.log(res)
        })
      }
    }
  }
</script>

<style scoped>

</style>
